package com.crl.module.loaders.workers
{
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.events.ProgressEvent;
	import flash.media.Sound;
	import flash.net.URLRequest;

	public class SoundWorker extends Worker
	{
		public function SoundWorker()
		{
			super();
		}
		
		public override function load(request:URLRequest):void
		{
			super.load(request);
			this.loader = new Sound();

			loader.addEventListener(Event.COMPLETE, onComplete);
			loader.addEventListener(ProgressEvent.PROGRESS, onProgress);
			loader.addEventListener(IOErrorEvent.IO_ERROR, onIOLoadError);
			loader.addEventListener(IOErrorEvent.DISK_ERROR, onIOLoadError);
			loader.addEventListener(IOErrorEvent.NETWORK_ERROR, onIOLoadError);
			loader.addEventListener(IOErrorEvent.VERIFY_ERROR, onIOLoadError);
			loader.addEventListener(Event.OPEN, onOpen);
		}
	}
}